package com.example.order.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.model.order.pojo.OrderDO;
import com.example.order.mapper.OrderMapper;
import com.example.order.rpc.facade.OrderFacade;
import com.example.order.service.OrderService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 订单 业务逻辑层 具体实现
 *
 * @author Lv
 * @date 2023/10/02
 */
@Slf4j
@Service
public class OrderServiceImpl extends ServiceImpl<OrderMapper, OrderDO> implements OrderService {

    @Autowired
    private OrderMapper orderMapper;

    @Autowired
    private OrderFacade orderFacade;

    /**
     * 测试用户接口RPC调用
     *
     * @return
     */
    @Override
    public String testUserRpc() {
        return orderFacade.testUserRpc();
    }

    /**
     * 测试order服务RPC调用
     *
     * @return
     */
    @Override
    public String testOrderRpc() {
        return "order Rpc invoke success";
    }
}
